package com.zyh.work3

import scala.io.StdIn

object WorkTest3 {
  def main(args: Array[String]): Unit = {
    println("输入年份")
    val str: String = StdIn.readLine()
    var map: Map[String,String] = Map()
    map += "2006" -> "意大利"
    map += "2002" -> "巴西"
    map += "1998" -> "法国"
    map += "1994" -> "巴西"
    map += "1990" -> "德国"
    val option: Option[String] = map.get(str)
    if(option==None) println("不存在")
    else
    println(s"option = ${option}")
  }
}
